<!DOCTYPE html>
<html lang="en">
        <head>
                <meta charset="UTF-8">
                <title>Title</title>
        </head>
        <body>
                <div th:replace="common/top"></div>

                <div id="BackLink">
                        <a th:href="@{viewProduct(productId=${product.productId})}"  th:text="'Rerurn to '+${product.productId}">Return to ***</a>
                </div>

                <div id="Catalog">

                        <table>
                                <tr>
                                        <td th:utext="${item.product.description}">${sessionScope.product.description}</td>
                                </tr>
                                <tr>
                                        <td><b th:text="${item.itemId}"> ${sessionScope.item.itemId} </b></td>
                                </tr>
                                <tr>
                                        <td th:text="${item.attribute1} +${item.attribute2}+${item.attribute3}+${item.attribute4}+${item.attribute5}"><b><font size="4" >
                                                ${sessionScope.item.attribute1}
                                                ${sessionScope.item.attribute2} ${sessionScope.item.attribute3}
                                                ${sessionScope.item.attribute4} ${sessionScope.item.attribute5}
                                        </font></b></td>
                                </tr>
                                <tr>
                                        <td th:text="${item.product.name}">${sessionScope.product.name}</td>
                                </tr>
                                <tr>
                                        <td th:if="${item.quantity<=0}"> Back ordered.</td>
                                        <td th:unless="${item.quantity<=0}" th:text="${item.quantity}+' in stock'"> ***  in stock.</td>

<!--                                        <c:if test="${sessionScope.item.quantity <= 0}">-->
<!--                                                Back ordered.-->
<!--                                        </c:if>-->
<!--                                        <c:if test="${sessionScope.item.quantity > 0}">-->
<!--                                                ${sessionScope.item.quantity} in stock.-->
<!--                                        </c:if>-->
                                </tr>
                                <tr>
                                        <td th:text="'$'+${item.listPrice}">$100</td>
                                </tr>

                                <tr>
                                        <td>
                                                <a class="Button"  th:href="@{/cart/addItemToCart(workingItemId=${item.itemId})}">Add to Cart</a>
                                        </td>
                                </tr>
                        </table>

                </div>


                <div th:replace="common/bottom"></div>

        </body>
</html>